<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <title></title>
  <meta name="Generator" content="Cocoa HTML Writer">
  <meta name="CocoaVersion" content="949.54">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 25.0px Helvetica}
    p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
    p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
    p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
    span.s1 {text-decoration: underline}
    span.s2 {color: #000cff}
    span.s3 {color: #ff000f}
    span.s4 {color: #01e312}
    span.s5 {color: #4d7714}
    span.s6 {color: #1ba39b}
  </style>
</head>
<body>
<p class="p1"><b>The Cecilia Editor</b></p>
<p class="p2"><br></p>
<p class="p3"> Cecilia is built around a simple and efficient Csound text editor.<span class="Apple-converted-space"> </span></p>
<p class="p2"><br></p>
<p class="p3">The editor opens autmatically when Cecilia is launched. Once you have chosen a module with the File/Modules menu, you can see its code by doing Cmd+E or going to the <i>Window</i> menu and selecting the <i>Flip Editor/Interface</i> option. </p>
<p class="p2"><br></p>
<center><img src="./images/editorEmpty.tiff"></center>
<p class="p2"><br></p>
<p class="p3">The editor is divided in three sections:</p>
<p class="p3">- Interface</p>
<p class="p3">- Orchestra</p>
<p class="p3">- Score</p>
<p class="p2"><br></p>
<p class="p3">Each of these sections can be adjusted in size using the dividers separating them. They can also be minimized using the arrow next to their header.</p>
<p class="p2"><br></p>
<p class="p3">To understand how to use of the <b>Editor</b>, you should be familiar with Csound programming. The online Csound Manual (http://www.csounds.com/manual/html/) is a good place to start.</p>
<p class="p2"><br></p>
<p class="p3"><u>Note:</u>   standard Csound (.csd) files can be loaded here. Go to <i>File</i> menu -&gt; Open. In the load file dialog, enable the .csd files.</p>
<p class="p2"><br></p>
<p class="p4"><span class="s1"><b>Interface</b></span></p>
<p class="p2"><br></p>
<p class="p3">To build an interface, use the syntax explained here: <a href="buildInterface.html">Building an Interface</a>. It allows the easy integration of various widgets to the Cecilia Interface.</p><br>
<p class="p3">Right-clicking in the <b>Interface</b> section shows a contextual menu with the various widgets availlable. This menu is a way of easily inserting the standard widgets to your interface.</p>
<p class="p2"><br></p>
<p class="p3">Cecilia keywords will automatically be highlighted in yellow to let you know that you are using the right syntax.<span class="Apple-converted-space"> </span></p>
<p class="p2"><br></p>
<p class="p4"><span class="s1"><b>Orchestra</b></span></p><br>
<p class="p3">This section is where the Csound orchestra is written. Standard Csound  syntax is used. However the Cecilia <b>Editor</b> offers a number of special features to facilitate the writing of well structured code.<span class="Apple-converted-space"> </span></p>
<p class="p2"><br></p>
<p class="p3">First, Cecilia identifies all Csound keywords in the text. It colorizes them depending on their function. Opcodes are colorized in <span class="s2"><b>blue</b></span>. Instruments and Opcodes statements are colorized in <span class="s3"><b>red</b></span>. Strings are colorized in <span class="s4"><b>green</b></span>. Comments are colorized in <span class="s5"><b>olive</b></span>.</p>
<p class="p2"><br></p>
<p class="p3"> To obtain information on a particular opcode, select the opcode in the text and hit Cmd+U. Or go to <i>Csound</i> menu and click <i>Help with the selected opcode</i>.<span class="Apple-converted-space">  </span>The Csound manual page for this opcode will load in your web browser (as defined in the Cecilia Preference Panel).</p>
<p class="p2"><br></p>
<p class="p3">While writing Csound code, <i>Auto-completion</i> can be used if it is set the <i>Format</i> menu. Just type in the first few letters of an opcode and hit Cmd+K. A contextual menu appears and give you all possible opcodes starting with those letters. Browse through them with the arrows and select the right one by hitting the Return key.</p>
<p class="p2"><br></p>
<p class="p3">When an opcode is identified in a line, the status bar (bottom part of the <b>Editor</b>) shows the standard syntax for that opcode.<span class="Apple-converted-space"> </span></p>
<p class="p2"><br></p>
<p class="p3">Right-clicking in the Orchestra section shows a contextual menu with all possible Csound opcodes.<span class="Apple-converted-space">  </span>This menu is a way of easily inserting an opcode with its standard syntax.<span class="Apple-converted-space"> </span></p>
<p class="p2"><br></p>
<p class="p3">Lines can conveniently be commented/uncommented with the <i>Un/Comment line(s)</i> function (in the<i>Format</i> menu). Place your cursor on the line(s) you want commented and hit Cmd+J to invert their current state.</p>
<p class="p2"><br></p>
<p class="p3">Csound code can be indented by going to the <i>Format</i> menu and selecting <i>Indent Orchestra</i>.</p>
<p class="p2"><br></p>
<p class="p3">Finally, a file path can be added to an orchestra with the <i>Insert file path...</i> option (Cmd+L) in the <i>Format</i> menu. A dialog window appears to help you choose a file. The complete file path is automatically added (inside double quotes) at your cursor position.<span class="Apple-converted-space"> </span></p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p4"><span class="s1"><b>Score</b></span></p><br>
<p class="p3">The score section aloows the use of standard Csound scores and <a href="pythonScripting.html">Python Scripted scores</a> developped for Cecilia.
<p class="p2"><br></p>
<p class="p3">Cecilia identifies all Csound score statements in the text and colorizes them. Score statements are colorized in <span class="s6"><b>cyan</b></span>. Comments are colorized in <span class="s5"><b>olive</b></span>.</p>
<p class="p2"><br></p>
<p class="p3">The <i>Tabulate score</i> option in the <i>Format</i> menu helps you organize your score. By hitting Shift+Cmd+I, Cecilia will automatically calculate the width of each column for an even distribution. A comment line is added to easily identify each column to its <b>p#</b> parameter.</p>
<p class="p2"><br></p>
<p class="p3"><br></p>
<p class="p3"><br></p>
<center><p class="p3">Return to <a href="./usingCecilia.html">Using Cecilia</a> section</p></center>
</body>
</html>
